<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="../Templates/InnerSystemTemplate.xhtml"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">
    
    <ui:define name="content">
        <h:form>
            <p:panel id="panel" header="Add New Employee"> 
                <p:ajaxStatus style="width:16px;height:16px;">   
                    <f:facet name="start">   
                        <p:graphicImage value="http://www.primefaces.org:8080/showcase/design/ajaxloading.gif" /> 
                    </f:facet> 
 
                    <f:facet name="complete">   
                        <h:outputText value="" />   
                    </f:facet>   
                </p:ajaxStatus> 
 
                <p:messages /> 
 
                <h:panelGrid columns="3" cellpadding="10">                     
                    <h:outputLabel for="username" style="font-weight: bold" value="User Name: " /> 
                    <p:inputText value="#{addEmployeeManagerBean.username}" required="true" label="Employee Name" requiredMessage="User Name is required." id="username"> 
                        
                    </p:inputText> 
                    <p:message for="username" />
                    
                    <h:outputLabel for="password" style="font-weight: bold" value="Password: " /> 
                    <p:password value="#{addEmployeeManagerBean.password}" required="true" label="Password" requiredMessage="Password is required." id="password" feedback="false" minLength="1">                         
                    </p:password> 
                    <p:message for="password" /> 
                    
                    <h:outputLabel for="employeeName" style="font-weight: bold" value="Employee Name: " /> 
                    <p:inputText value="#{addEmployeeManagerBean.employeeName}" required="true" label="Employee Name" requiredMessage="Employee Name is required." id="employeeName">                         
                    </p:inputText> 
                    <p:message for="employeeName" /> 
                    
                    <h:outputLabel for="NRIC" style="font-weight: bold" value="NRIC: " /> 
                    <p:inputText required="true" label="NRIC" requiredMessage="NRIC is required." id="NRIC" value="#{addEmployeeManagerBean.employeeNRIC}">                         
                    </p:inputText> 
                    <p:message for="NRIC" /> 
 
                    <h:outputLabel for="employeeEmail" style="font-weight: bold" value="Email: " /> 
                    <p:inputText required="true" label="email" requiredMessage="Email is required." id="employeeEmail" value="#{addEmployeeManagerBean.employeeEmail}">                         
                    </p:inputText> 
                    <p:message for="employeeEmail" /> 
                    
                    <h:outputLabel for="address" style="font-weight: bold" value="address: " /> 
                    <p:inputText required="true" label="address" requiredMessage="Address is required." id="address" value="#{addEmployeeManagerBean.employeeAddress}">                         
                    </p:inputText> 
                    <p:message for="address" /> 
                    
                    <h:outputLabel for="contactNumber" style="font-weight: bold" value="Contact Number: " /> 
                    <p:inputText required="true" label="contactNumber" requiredMessage="contact Number is required." id="contactNumber" value="#{addEmployeeManagerBean.employeeContactNumber}">                         
                    </p:inputText> 
                    <p:message for="contactNumber" /> 
 
                    <h:outputLabel for="Attempt" style="font-weight: bold" value="Attempt: " /> 
                    <p:inputText required="true" label="attempt" requiredMessage="Attempt is required." id="Attempt" value="#{addEmployeeManagerBean.attempt}">                         
                    </p:inputText> 
                    <p:message for="Attempt" /> 
                    
                    <h:outputLabel for="activatedStatus" style="font-weight: bold" value="Activated Status: " /> 
                    <p:inputText required="true" label="activatedStatus" requiredMessage="Activated Status is required." id="activatedStatus" value="#{addEmployeeManagerBean.activatedStatus}">                         
                    </p:inputText> 
                    <p:message for="activatedStatus" /> 

                </h:panelGrid>
                
                <p:commandButton id="btn" value="Save New Employee" update="panel" actionListener="#{addEmployeeManagerBean.saveNewEmployee}" ajax="true" />
            </p:panel> 
        </h:form>
    </ui:define>

</ui:composition>
